package com.itheima.mapper;

import com.itheima.entity.Movies;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MoviesMapper {

    List<Movies> findList(Integer cid, String keyword);

    void deleteBatch(Integer[] ids);

    @Select("select * from tb_movies where cid = #{categoryId} order by order_no desc,show_time desc")
    List<Movies> findListByCategoryId(Integer categoryId);

    @Select("select * from tb_movies where id = #{id}")
    Movies findById(Integer id);

    List<Movies> selectByCategoryId(String id);

    void add(Movies movies);

    void update(Movies movies);
}